package com.sun.merchant.ctrl.anon;

import com.alibaba.fastjson.JSON;
import com.sun.entity.SysRole;
import com.sun.service.DemoService;
import com.sun.service.SysRoleService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhangquanwei
 * @version 1.0
 * @since 2025-03-07 15:51
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

    @Resource
    private DemoService demoService;
    @RequestMapping("/demo01")
    public String demo01() {
        List<SysRole> sysRoles = demoService.demo01();
        return JSON.toJSONString(sysRoles);
    }
}
